package pt.nmfa.peste.entity;

// Generated Mar 5, 2011 1:52:20 PM by Hibernate Tools 3.3.0.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * TvProgram generated by hbm2java
 */
@Entity
@Table(name = "TvProgram", catalog = "HomeDB")
public class TvProgram implements java.io.Serializable {

	private Long programId;
	private Channels channels;
	private Date dateTime;
	private String name;
	private String shortDescription;
	private String longDescription;
	private String id;
	private Date endDateTime;

	public TvProgram() {
	}

	public TvProgram(Channels channels, Date dateTime) {
		this.channels = channels;
		this.dateTime = dateTime;
	}

	public TvProgram(Channels channels, Date dateTime, String name,
			String shortDescription, String longDescription, String id,
			Date endDateTime) {
		this.channels = channels;
		this.dateTime = dateTime;
		this.name = name;
		this.shortDescription = shortDescription;
		this.longDescription = longDescription;
		this.id = id;
		this.endDateTime = endDateTime;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "programId", unique = true, nullable = false)
	public Long getProgramId() {
		return this.programId;
	}

	public void setProgramId(Long programId) {
		this.programId = programId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "epgPos", nullable = false)
	@NotNull
	public Channels getChannels() {
		return this.channels;
	}

	public void setChannels(Channels channels) {
		this.channels = channels;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "dateTime", nullable = false, length = 0)
	@NotNull
	public Date getDateTime() {
		return this.dateTime;
	}

	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}

	@Column(name = "name", length = 100)
	@Length(max = 100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "shortDescription", length = 200)
	@Length(max = 200)
	public String getShortDescription() {
		return this.shortDescription;
	}

	public void setShortDescription(String shortDescription) {
		this.shortDescription = shortDescription;
	}

	@Column(name = "longDescription")
	public String getLongDescription() {
		return this.longDescription;
	}

	public void setLongDescription(String longDescription) {
		this.longDescription = longDescription;
	}

	@Column(name = "id", length = 6)
	@Length(max = 6)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "endDateTime", length = 0)
	public Date getEndDateTime() {
		return this.endDateTime;
	}

	public void setEndDateTime(Date endDateTime) {
		this.endDateTime = endDateTime;
	}

}
